//*****************************************************************************

//
// ABEC3 Solving Script
// Project: IB-Cone-3D with Elements
//
//*****************************************************************************


// Point declarations

File="Nodes.txt"


// Cone-shaped diaphragm in infinite baffle. Because a cone is concave and extends
// behind the baffle the usual mirror-trick for modelling the Infinite Baffle
// boundary condition does not work.
// ABEC solves this situation with the help of sub-domain modelling.
// This example demonstrates the basic idea. Here the diaphragm-cone is modelled
// with Elements and a section Driving. The interface can be any virtual surface
// in front of the diaphragm. Here, for convenience, the cone-elements are
// copied and then mirrored.

Control_Solver
  f1=100;  f2=3000;  NumFrequencies=20;  Abscissa=log  // Frequency abscissa
  MeshFrequency=3000Hz    // Control of auto-mesher
  Sym=y                   // Symmetry in y
  Dim=3D
  NUC=true


Subdomain_Properties  "Cone"
  Subdomain=1


Subdomain_Properties  "Free space"
  Subdomain=2
  ElType=Exterior           // External radiation
  IBPlane=x                    // Infinite baffle with normal pointing into x-direction.


// Elements forming the diaphragm
  
Elements "Diaphragm"
  RefNodes="N"
  Subdomain=1
  SwapNormals=true
  101   2102  2119  2111  2110
  102   2119  2120  2112  2111
  103   2120  2121  2113  2112
  104   2121  2122  2114  2113
  105   2122  2123  2115  2114
  106   2123  2124  2116  2115
  107   2124  2125  2117  2116
  108   2125  2101  2118  2117

  201   2110  2111  2105
  202   2111  2106  2105
  203   2111  2112  2106
  204   2112  2113  2106
  205   2113  2107  2106
  206   2113  2114  2107
  208   2114  2115  2107
  209   2115  2108  2107
  210   2115  2116  2108
  211   2116  2117  2108
  212   2117  2109  2108
  213   2117  2118  2109

  301   2105  2106  2104
  302   2106  2107  2104
  303   2107  2108  2104
  304   2108  2109  2104


// Assign driving to all elements of section "Diaphragm".
// Note, the actual driving will be assigned during observation stage.

Driving  "Diaphragm"
  RefElements="Diaphragm"
  DrvGroup=1001
  Direction=2102,2101,2103 RefNodes=N


// Subdomain modelling, interface.

Elements "Interface"
  RefNodes="N"
  Subdomain=1,2     // Interfacing subdomains 1 and 2
  Mirror=x          // Mirror vertices along x-axis
  SwapNormals=true
  101   2102  2119  2111  2110
  102   2119  2120  2112  2111
  103   2120  2121  2113  2112
  104   2121  2122  2114  2113
  105   2122  2123  2115  2114
  106   2123  2124  2116  2115
  107   2124  2125  2117  2116
  108   2125  2101  2118  2117

  201   2110  2111  2105
  202   2111  2106  2105
  203   2111  2112  2106
  204   2112  2113  2106
  205   2113  2107  2106
  206   2113  2114  2107
  208   2114  2115  2107
  209   2115  2108  2107
  210   2115  2116  2108
  211   2116  2117  2108
  212   2117  2109  2108
  213   2117  2118  2109

  301   2105  2106  2104
  302   2106  2107  2104
  303   2107  2108  2104
  304   2108  2109  2104

